#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	for (int i = 1; i <= 4; i++)
	{
		for (int j = 1; j <= 8; j*=2)
		{
			printf("%d ", i * j);
		}
		printf("\n");
	}
	return 0;
}